<script>
jQuery(document).ready(function () {
    jQuery("#traction tr").click(function () {
      //jQuery(this).hide();
      var id;
      id = jQuery(this).attr("alt");
      if(id>0)
      {
          location.href="<?php echo $this->baselink; ?>admin/translate/editlocation/uid/"+id;
      }

    });
});
</script>
<div class="w100p filter">
      <div class="float_right">
        <div class="float_left button_leftb m10r">
          <div class="button_rightb"><a href="<?php echo $this->baseUrl.'admin/translate/addlocation'; ?>">
                    <?php echo $this->translate->_("Add new Location");?>
                </a></div>
        </div>

        <div class="cl"></div>
      </div>
      <div class="cb"></div>
    </div>
<div id="main">
      <div style="width:600px" class="mc bg_table po p15b">
        <div class="top_left"></div>
        <div class="top_right"></div>
        <div class="bottom_left"></div>
        <div class="bottom_right"></div>
        <h3 class="p15t p15l p15b bg_bot"><b><?php echo $this->translate->_("Course Locations");?></b></h3>
        <table cellpadding="0" cellspacing="0" id="traction">
          <tr>
            <th width="25%" bgcolor="#bebebe"><b><?php echo "<a href='".$this->url(array('action' => 'location', 'sorting' => 'id', 'type' => $this->typesorting))."'>".$this->translate->_("Course Location ID");?></a></b></th>
            <th width="40%" bgcolor="#bebebe"><?php echo "<a href='".$this->url(array('action' => 'location', 'sorting' => 'name', 'type' => $this->typesorting))."'>".$this->translate->_("Course Location Name");?></a></th>
            
          <?php
                        if($_SESSION['userSchool']=='')
                        {
                             ?>
            <th width="30%" bgcolor="#bebebe"><?php echo "<a href='".$this->url(array('action' => 'location', 'sorting' => 'school', 'type' => $this->typesorting))."'>".$this->translate->_("School Name");?></a></th>
                            <?php
                        }
                        ?>
          </tr>
<?php $isColor = 'bg2';
if (count($this->paginator) && !empty($this->paginator)):       
foreach($this->paginator as $v)
{ 
            if ($isColor== 'bg1') {
                    $isColor = 'bg2';
            } else {
                    $isColor = 'bg1';
            }
?>	
          <tr title="Click to view detail" class="<?php echo $isColor;?>" alt="<?php echo $v['CourseLocationID'];?>">
            <td><?php echo $v['CourseLocationID'];?></td>
            <td><?php echo $v['CourseLocationName'];?>
            <?php
echo  "<div class=\"row-actions short_action\"><span><a href='".$this->url(array('action' => 'deletelocation', 'uid' => $v['CourseLocationID']))."'>Trash </a></span></div>";
			?></td>
             <?php
                        if($_SESSION['userSchool']=='')
                        {
                             echo '<td>';
                             foreach($this->schoolObj as $b){
                                echo $v['SchoolID']==$b['SchoolID']?$b['SchoolName']:"";
                             }
                             echo '</td>'  ;
                        }
                        ?>
          </tr>
         
      
<?php
}
endif; ?>
        </table>
      </div>    
<?php echo $this->paginationControl($this->paginator,'Sliding', 'admin_pagination_control.phtml'); ?>
      	
